package com.example.llollama.controller;

import com.example.llollama.service.ContextChatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/context")
public class ContextChatController {
    @Autowired
    private ContextChatService chatService;

    @GetMapping("/send")
    public String sendMessage(@RequestParam String sessionId, @RequestParam String message) {
        return chatService.chat(sessionId, message);
    }
}
